package com.hc.event.controller;

import com.hc.event.event01.MyCustomEventPublisher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: huangcheng
 * @CreateTime: 2023-09-06  10:07
 * @Description:
 * @Version: 1.0
 */
@RestController
public class SpringEventController {
    @Autowired
    private MyCustomEventPublisher eventPublisher;

    @RequestMapping("/test")
    public void test(){
        eventPublisher.publishCustomEvent("hello word");
    }

}
